1. Field of the Invention
The present invention relates, in general, to data processing systems.
2. Description of the Related Art
Data processing systems are systems that manipulate, process, and store data and are notorious within the art. Personal computer systems, and their associated subsystems, constitute well known species of data processing systems.
One particularly popular type of personal computer system is the portable computer system (e.g., laptop, notebook, sub-notebook, and palm-held computer systems). Portable computer systems allow stand-alone computing and typically have their own power-supplies, modems, and storage devices.
In order to allow maximum flexibility of use, portable computer systems typically utilize a "mix" of different types of power supplies. For example, a portable computer system typically has at least one external power supply adapter (e.g., an AC-DC adapter, or a cigarette lighter adapter), which will allow the portable computer to be powered from an external power outlet such as an AC wall outlet, or a cigarette lighter outlet in an automobile. In addition, a portable computer system typically has at least one rechargeable battery, which serves as an internal power supply and which allows the portable computer system to be powered up and used in remote locations where no external power supplies are present.
Loss of power to a data processing system can be a catastrophic event. For example, if power is lost while a personal computer user is working on a critical document (such as an engineering schematic) stored in the Random Access Memory (RAM) of the computer, the data in the RAM is typically lost.
When a portable computer system is utilizing battery power in a location where no external power supply is readily available, loss of power due to an expended battery can be catastrophic. Accordingly, most portable computer systems provide special battery monitoring equipment (e.g., hardware and/or software and/or firmware) which gauges how much battery power the portable computer systems have at any particular point in time. Additionally, in an effort to avoid a catastrophic loss of data due to loss of power arising from an expended battery, power down utilities (e.g., programs) observe the special battery monitoring equipment and automatically perform a "suspend to disk" (i.e., save the state of the personal computer to disk) and subsequent immediate power down when battery power is sensed as being at a dangerously low level.
One common type of special battery monitoring equipment is known in the art as a "coulomb counter," which essentially keeps track of the inflow and outflow of electric energy from a battery. Batteries store energy in the form of electric charges, which are typically denoted in units of coulombs. A coulomb counter first determines the number of coulombs which are "loaded" into a battery by a battery charger. The charge loaded into the battery is typically determined by multiplying measured average current, delivered by the battery charger to the battery by the time interval, expressed in seconds, during which the measured average current was delivered. That is, since one ampere is roughly one coulomb per second, the net charge transferred can be roughly calculated by multiplying average charger-to-battery current by the time it was flowing (e.g., coulombs=seconds.times.coulombs/second). Thereafter, the coulomb counter keeps a running aggregate total of the charge extracted from the battery using the same coulomb counting mechanism. That is, an aggregate count is kept of charge leaving the battery where the charge leaving the battery during any interval of time is calculated by multiplying measured average current out of the battery by the time the current is flowing out of the battery. Since an aggregate count is kept of the charge leaving the battery, the coulomb counter can be used to alert the system when charge out of the battery is approaching the charge loaded into the battery.
Notice that the foregoing is not actually measuring charge in the battery, but is merely assuming that a battery contains a total charge delivered during an interval of charging. It is very common for a partially charged battery to be connected to a battery charger. Since the battery already contains a certain amount of stored charge, the coulombs "in," as read by the coulomb counter, will actually be less than the charge ultimately stored in battery (because the battery has this charge in, plus the battery's initial partial stored charge). It has been found empirically that repeated occurrences of the foregoing scenario (charging a partially charged battery) can "confuse" the coulomb counter as to the actual amount of charge available, which can lead to malfunctions (e.g., showing a low battery condition when none in fact exists, or, in some instances, immediately suspending to disk when battery power is accessed, essentially rendering the system's battery unusable).
Another type of problem that can occur with special battery monitoring equipment utilizing coulomb counting is related to loss of capacity as a battery ages. Those skilled in the art will recognize that a battery stored at full charge over a long period of time will typically lose its ability to store charge. Consequently, whereas the coulomb count into the battery might indicate that a given amount of charge is available in the battery, in point of fact, due to aging and physical changes within the battery, the actual charge which can be ejected from the battery is actually much less.
Accordingly, the decreased capacity battery will actually run out of energy while the coulomb counter still shows plenty of charge resident within the battery. This can cause loss of power with relatively no warning, which can be catastrophic in a data processing system context.
Another common type of special battery monitoring equipment keys off the voltage of the battery. That is, when the voltage drops to a certain pre-specified level, special battery monitoring equipment assumes a low power condition exists. This type of special battery monitoring equipment is particularly prone to error in that variability in batteries can result in a relatively low battery voltage, when in fact a significant amount of energy is still stored in the battery. Thus, a low battery condition may be detected when in fact there is actually plenty of energy stored in the battery. The converse is also true, for reasons similar to those discussed above. That is, the battery might show a fully charged voltage, but, due to loss of capacity associated with aging, run out of energy even though its measured voltage is within tolerance.
Accordingly, it is apparent from the foregoing that there is a need in the art for method and device which give an accurate assessment of energy stored in a battery, such as a data processing system battery.